package c04_hashmap;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test {
    public static void main(String[] args) {

        Map<Student9, String> stumap = new HashMap<>();

        stumap.put(new Student9("张三", 23,"男"), "北京");
        stumap.put(new Student9("李四", 24,"男"), "上海");
        stumap.put(new Student9("王五", 25,"男"), "广州");
        stumap.put(new Student9("赵六", 26,"男"), "深圳");
        Set<Map.Entry<Student9, String>> entries = stumap.entrySet();
        for (Map.Entry<Student9, String> entry : entries) {
           //System.out.println(entry.getKey() + "----" + entry.getValue());
          Student9 key = entry.getKey();
          String value = entry.getValue();

           System.out.println(key + " ------> " + value);
        }


    }
}
